<?php

namespace backend\modules\mobo\models;

use Yii;

/**
 * This is the model class for table "mobo_models_field".
 *
 * @property integer $fieldid
 * @property integer $modelid
 * @property string $name
 * @property string $field
 * @property string $formtype
 * @property string $fieldtype
 * @property string $fieldlength
 * @property integer $listorder
 * @property integer $disabled
 * @property integer $primarytable
 * @property integer $required
 * @property string $setting
 * @property string $param
 * @property string $api
 * @property integer $allowinput
 */
class ModelsField extends \base\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'mobo_models_field';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['modelid', 'listorder', 'disabled', 'primarytable', 'required', 'allowinput'], 'integer'],
            [['setting', 'param', 'api'], 'string'],
            [['name', 'field', 'fieldtype', 'fieldlength'], 'string', 'max' => 50],
            [['formtype'], 'string', 'max' => 20]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'fieldid' => 'Fieldid',
            'modelid' => 'Modelid',
            'name' => 'Name',
            'field' => 'Field',
            'formtype' => 'Formtype',
            'fieldtype' => 'Fieldtype',
            'fieldlength' => 'Fieldlength',
            'listorder' => 'Listorder',
            'disabled' => 'Disabled',
            'primarytable' => 'Primarytable',
            'required' => 'Required',
            'setting' => 'Setting',
            'param' => 'Param',
            'api' => 'Api',
            'allowinput' => 'Allowinput',
        ];
    }
}
